<html>
<head><meta charset="utf-8"><title>Ludvig Janiuk · new members · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/index.html">new members</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Ludvig.20Janiuk.html">Ludvig Janiuk</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="241310835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122652-new%20members/topic/Ludvig%20Janiuk/near/241310835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ludvig Janiuk <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Ludvig.20Janiuk.html#241310835">(Jun 02 2021 at 19:53)</a>:</h4>
<p>Hi all! I'm Ludvig, and I'm a bit interested in getting involved in Rust language design. Something I would be passionate about would be an actual grammar for the language. However, I had no luck finding support for this on the Discord, so I'll try here. If anyone could help, please write!</p>



<a name="241319877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122652-new%20members/topic/Ludvig%20Janiuk/near/241319877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Ludvig.20Janiuk.html#241319877">(Jun 02 2021 at 21:05)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="417915">@Ludvig Janiuk</span>!  There isn't a canonical grammar for the language.  There are a few different places you can look:</p>
<ul>
<li>The <a href="https://doc.rust-lang.org/nightly/reference/">reference</a>. It has some known bugs, and doesn't cover some ambiguities, but is generally correct.</li>
<li>The <a href="https://github.com/rust-lang/wg-grammar">grammar working group</a> was an attempt to make a grammar specification, but it fizzled out.</li>
<li>Rust-analyzer uses <a href="https://github.com/rust-analyzer/ungrammar/blob/master/rust.ungram">this definition</a>, though I don't think it handles ambiguities? </li>
</ul>
<p>There are a bunch of older grammars out there, but I think most of them are quite out of date now.  The main source of truth is still <a href="https://github.com/rust-lang/rust/tree/master/compiler/rustc_parse">rustc's implementation</a>.  <code>syn</code> is also a good parser, but I'm not sure how it compares to <code>rustc</code>.</p>



<a name="241321952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122652-new%20members/topic/Ludvig%20Janiuk/near/241321952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Ludvig.20Janiuk.html#241321952">(Jun 02 2021 at 21:25)</a>:</h4>
<p>That rust-analyzer definition explicitly doesn't handle ambiguities. It only defines the shape of the language and allows more than the actual rust grammar.</p>



<a name="241377856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122652-new%20members/topic/Ludvig%20Janiuk/near/241377856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ludvig Janiuk <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Ludvig.20Janiuk.html#241377856">(Jun 03 2021 at 11:32)</a>:</h4>
<p>Thanks for responding! The reference looks valuable, but is an informal description. I'll have to take a closer look at the Rust-analyzer ungrammar. Does anyone know some people that were leading the grammar working group that I could get in touch with, to talk about why it fizzled out?</p>



<a name="241379437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122652-new%20members/topic/Ludvig%20Janiuk/near/241379437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Ludvig.20Janiuk.html#241379437">(Jun 03 2021 at 11:50)</a>:</h4>
<p>Looking at the WG's <a href="https://github.com/rust-lang/team/blob/master/teams/wg-grammar.toml">team file</a> the current leads are <span class="user-mention silent" data-user-id="119009">eddyb</span> and <span class="user-mention silent" data-user-id="116013">qmx</span></p>



<a name="241379887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122652-new%20members/topic/Ludvig%20Janiuk/near/241379887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ludvig Janiuk <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Ludvig.20Janiuk.html#241379887">(Jun 03 2021 at 11:55)</a>:</h4>
<p>Thanks <span class="user-mention" data-user-id="255061">@Léo Lanteri Thauvin</span>, I have reached out to them.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>